<div class="task">
  <%= form_for @task, :html => { :multipart => true,class: 'task_form form-horizontal',:id => 'newTask'} do |f| %>
      <div class="content_middle form">
        <div class="fields_content">
          <div class="fields_content_container">
            <% if @task.errors.any? %>
                <div id="error_explanation">
                  <h2><%= pluralize(@task.errors.count, "error") %> prohibited this task from being saved:</h2>
                  <ul>
                    <% @task.errors.full_messages.each do |msg| %>
                        <li><%= msg %></li>
                    <% end %>
                  </ul>
                </div>
            <% end %>

            <div class="fields_content_data">

              <div class="field_row">
                <div class="label_field left single"><span><%= t('views.tasks.name') %></span></div>
                <div class="medium_field">
                  <%= f.text_field :name  %>
                </div>
              </div>
              <!--field_row-->

              <div class="field_row">
                <div class="label_field left single"><%= t('views.tasks.description') %></div>
                <div class="medium_field">
                  <%= f.text_field :description %>
                </div>
              </div>
              <!--field_row-->

              <div class="field_row rate_div">
                <div class="label_field left single"><span><%= t('views.tasks.rate') %></span></div>
                <div class="small_field"><%= f.number_field :rate, min: 0, step: "any" %></div>
              </div>

              <div class="options_row clients">
                <div class="label_field left single options template"><%= t('views.tasks.make_this_task_available_to') %>:</div>
                <div class="options_content">
                  <%= associate_account(controller_name, action_name, @task) %>
                </div>
              </div>


            </div>
            <!--fields_content_data-->
          </div>
          <!--fields_content_container-->
        </div>
        <!--fields_content-->
      </div>
      <!--content_middle-->

      <div class="content_bottom">
        <%= f.submit :class => "btn_large submit task-submit-btn" %>
        <%= link_to t("views.common.cancel"), tasks_path, :class => 'btn_large grey' %>
      </div>
  <% end %>
</div><!--tasks-->